package com.smart.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.smart.common.PageInfo;
import com.smart.model.domain.ProjectDO;
import com.smart.model.request.ProjectRequest;
import com.smart.model.vo.ProjectVO;
import com.smart.model.vo.UnReportVO;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author zhanghong
 */
public interface ProjectService extends IService<ProjectDO> {

    /**
     * 根据主键查询
     * @param id
     * @return
     */
     ProjectVO getByKey(Long id);
    /**
     * 分页查询，手动分页
     * @param request
     * @return
     */
    PageInfo<ProjectVO> pageQuery(ProjectRequest request);
    /**
     * 列表查询
     * @param request
     * @return
     */
    List<ProjectVO> listQuery(ProjectRequest request);
    /**
     * 注册
     * @param request
     * @return
     */
    String signIn(ProjectRequest request, HttpServletRequest req);
    /**
     * 根据主键更新
     * @param request
     * @return
     */
    String updateByKey(ProjectRequest request,HttpServletRequest req);

    String projectUpdateByKey(ProjectRequest request, HttpServletRequest req);

    /**
     * 查询指定状态的项目
     * @param statusList
     * @return
     */
    List<ProjectVO> listProjectByStatus(List<String> statusList);

    ProjectDO selectByUserInfo(String account, String password);

    Object selectMaProjectList(ProjectRequest request, Pageable pageable);

    Object selectMaProjectDetail(Long id);

    ProjectVO queryProject(String code);

    /**
     * 获取未提报数量
     * @return
     */
    UnReportVO getUnReport();

    /**
     * 统计在监项目数量
     * 名词解释：
     * 在监：项目未删除、有效中且项目状态为非完工状态的项目
     * @return
     */
    Integer countOnlineProject();
}
